package struct;

import java.util.ArrayList;
import java.util.List;

public class StructValue {

    /**
     * 原始数据
     */
    public final List<Object> values;

    public StructValue(List<Object> values) {
        this.values = values;
    }


    private Object to() {
        return values.get(0);
    }

    public Float toFloat() {
        return (Float) to();
    }

    public List<Float> toFloatList() {
        List<Float> list = new ArrayList<>();
        for (Object value : values) {
            list.add((Float) value);
        }
        return list;
    }
}
